/*

	eCry - CRYSIS MOD - InfinityTutorials.com
	
	You may not re-use, distribute or take ownership of this file. All rights reserved.
	
*/

eMain(){}

eSuitFunctions()
{
	self endon( "death" );
	
	eSuitOpen = false;
	eOption = 0;
	
	while( 1 )
	{
		if( self useButtonPressed() && !eSuitOpen )
		{
			self.eCry_suit_options.alpha = 1;
			self DisableWeapons();
			self setClientDvar( "r_blur", "2" );
			eSuitOpen = true;
			wait 0.5;
		}
		
		if( self attackButtonPressed() && eSuitOpen )
		{
			eOption++;
			
			if( eOption == 0 )
				self.eCry_suit_options setShader( "ecry_suit_escape", 100, 100 );
			else if( eOption == 1 )
				self.eCry_suit_options setShader( "ecry_suit_strength", 100, 100 );
			else if( eOption == 2 )
				self.eCry_suit_options setShader( "ecry_suit_armor", 100, 100 );
			else if( eOption == 3 )
				self.eCry_suit_options setShader( "ecry_suit_speed", 100, 100 );
			else if( eOption == 4 )
				self.eCry_suit_options setShader( "ecry_suit_cloak", 100, 100 );
			else if( eOption > 4 )
			{
				eOption = 0;
				self.eCry_suit_options setShader( "ecry_suit_escape", 100, 100 );
			}
			
			wait 0.2;
		}
		
		if( self useButtonPressed() && eSuitOpen )
		{
			if( eOption == 0 )
			{
				//self thread eCryCore\eCrySounds::eSp( "eCryEnergyCritical" );
			}
			else if( eOption == 1 )
			{
				self thread eCryCore\eCrySounds::eSp( "eCryMaximumStrength" );
			}
			else if( eOption == 2 )
			{
				self thread eCryCore\eCrySounds::eSp( "eCryMaximumArmor" );
			}
			else if( eOption == 3 )
			{
				self thread eCryCore\eCrySounds::eSp( "eCryMaximumSpeed" );
			}
			else if( eOption == 4 )
			{
				self thread eCryCore\eCrySounds::eSp( "eCryCloakEngaged" );
			}
			
			self.eCry_suit_options.alpha = 0;
			eSuitOpen = false;
			self setClientDvar( "r_blur", "0" );
			self EnableWeapons();
			wait 1;
		}
		
		wait 0.001;
	}
}